<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>

        <h:form>
            <p:panel header="Change Password" >
                <f:facet name="header" >
                    <p:outputLabel value="Change Password" ></p:outputLabel>
                    <p:commandButton ajax="false" value="Back" style="float: right;"
                                     action="index" ></p:commandButton>
                </f:facet>
                <p:growl />
                <p:panelGrid columns="2" >
                    <p:outputLabel  value="Name" ></p:outputLabel>
                    <p:outputLabel  value="#{webUserController.current.webUserPerson.name}" ></p:outputLabel>
                    <p:outputLabel  value="User Name" ></p:outputLabel>
                    <p:outputLabel  value="#{webUserController.current.name}" ></p:outputLabel>
                    <h:outputLabel value="New Password"/>
                    <h:inputSecret  value="#{webUserController.newPassword}"/>
                    <h:outputLabel value="Re-enter new Password"/>
                    <h:inputSecret   value="#{webUserController.newPasswordConfirm}"/>
                    <p:defaultCommand target="btnChangePassword"/>
                    <p:commandButton id="btnChangePassword" ajax="false" value="Change Password" 
                                     action="#{webUserController.changeCurrentUserPassword}" 
                                     onclick="onSubmitButton();"/>
                </p:panelGrid>
            </p:panel>
        </h:form>


    </h:body>
</html>

